﻿
INSERT INTO [FloatDataFact]
		([Time], [TagId], [Value], [IsNan], [IsInfinity])
EXECUTE [dbo].[InterpolateFloatData] {0}

--MERGE [FloatDataFact] AS target
--	USING [tmp_FloatDataFact] AS source ON
--		(target.TagId = source.TagId AND target.[Time] = source.[Time])
--	WHEN MATCHED THEN
--		UPDATE SET
--			target.Value = source.Value,
--			target.IsNan = source.IsNan,
--			target.IsInfinity = source.IsInfinity
--	WHEN NOT MATCHED THEN
--		INSERT ([Time], [TagId], [Value], [IsNan], [IsInfinity]) VALUES
--		(source.[Time], source.[TagId], source.[Value], source.[IsNan], source.[IsInfinity]);

--DROP TABLE [tmp_FloatDataFact];